package com.gw.smscheck.service.business.positionInfo.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.gw.smscheck.dao.business.positionInfo.PositionTrajectoryMapper;
import com.gw.smscheck.entity.business.positionInfo.PositionTrajectory;
import com.gw.smscheck.service.business.positionInfo.PositionTrajectoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PositionTrajectoryServiceImpl implements PositionTrajectoryService {
	@Autowired
	private PositionTrajectoryMapper positionTrajectoryMapper;
	@Override
	public Integer add(PositionTrajectory positionTrajectory) {
		return positionTrajectoryMapper.add(positionTrajectory);
	}
	@Override
	public List<PositionTrajectory> findAll() {
		return positionTrajectoryMapper.findAll();
	}
	@Override
	public PageInfo<PositionTrajectory> pageSelect(PositionTrajectory dto) {
		PageHelper.startPage(dto.getPage(), dto.getRows(), "create_time desc");// 排序
		List<PositionTrajectory> resultList = positionTrajectoryMapper.pageSelect(dto);
		PageInfo<PositionTrajectory> pageInfo = new PageInfo<>(resultList);
		return pageInfo;
	}
	@Override
	public PositionTrajectory findById(Integer dto) {
		return positionTrajectoryMapper.findById(dto);
	}
	@Override
	public Integer update(PositionTrajectory positionTrajectory) {
		return positionTrajectoryMapper.update(positionTrajectory);
	}
	@Override
	public Integer delByIds(String[] ids) {
		return positionTrajectoryMapper.delByIds(ids);
	}

	@Override
	public List<PositionTrajectory> findPositionTrajectory(PositionTrajectory dto) {
		return positionTrajectoryMapper.findPositionTrajectory(dto);
	}
}

